package cn.com.farsgiht.bluetoothdemo.task;

import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

import android.R.integer;
import android.os.Handler;

public class Task {
	public static final int TASK_START_ACCEPT = 1;
	public static final int TASK_START_CONN_THREAD = 2;
	public static final int TASK_SEND_MSG = 3;
	public static final int TASK_GET_REMOTE_STATE = 4;
	public static final int TASK_RECV_MSG = 5;
	public static final int TASK_RECV_FILE = 6;
	public static final int TASK_RECV_FILE_DATA=9;
	/** mParam[0]：path */
	public static final int TASK_SEND_FILE = 7;
	public static final int TASK_PROGRESS = 8;
	public static final int TASK_END=0;

	
	// 任务ID
	private int mTaskID;
	// 任务参数列表
	public Object[] mParams;
	
	private Handler mH;
	
	
	public Task(Handler handler, int taskID, Object[] params){
		this.mH = handler;
		this.mTaskID = taskID;
		this.mParams = params;
	}
	
	public Handler getHandler(){
		return this.mH;
	}
	
	public int getTaskID(){
		return mTaskID;
	}
	public static  Socket socket=null;
    public static List<Socket> socketList=new ArrayList<Socket>();//用来保存连接成功的socket(一个socket代表一个客户端)
    public static final int port = 54321;//端口号
    public static  boolean isWifiHotEnabled ;
}
